package com.example.swordkotlin

object Test10 {

    @JvmStatic
    fun main(args: Array<String>) {
        val pre = intArrayOf(1, 2, 4, 7, 3, 5, 6, 8)
        val vin = intArrayOf(4, 7, 2, 1, 5, 3, 8, 6)
    }

    class TreeNode(var `val`: Int, var left: TreeNode? = null, var right: TreeNode? = null)


    /**
     * 斐波那契数列
     */

    open fun Fibonacci(n: Int): Int {
        return if (n == 1 || n == 2) {
            1
        } else {
            Fibonacci(n - 2) + Fibonacci(n - 1)
        }
    }
}